package com.woniuxy.health.auth.controller;

import com.woniuxy.health.auth.entity.User;
import com.woniuxy.health.auth.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("auth")
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("find")
    public User find(String account){
        User user = userService.findRoleAndPerms(account);
        return user;
    }
}
